﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CubeStone.Wang.Utilities.FileOperation
{
    /// <summary>
    /// 文件上传接口
    /// </summary>
    public interface IUploadFile
    {
        /// <summary>
        /// 保存文件
        /// </summary>
        /// <param name="dataByte">数据流</param>
        /// <param name="profix">文件后缀（例：jpg）</param>
        /// <returns>返回文件路径</returns>
        string Save(Stream stream, string profix);

        /// <summary>
        /// 保存文件
        /// </summary>
        /// <param name="dataByte">数据byte[]</param>
        /// <param name="profix">文件后缀（例：jpg）</param>
        /// <returns></returns>
        string Save(byte[] dataByte, string profix);
    }
}